package com.eedi.framework.social.dal.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eedi.framework.common.enums.UserTypeEnum;
import com.eedi.framework.org.core.db.OrgInfoBaseDO;
import com.eedi.framework.social.enmus.OrgSocialTypeEnum;
import lombok.*;

/**
 * 社交用户的绑定
 * 即 {@link OrgSocialUserDO} 与 UserDO 的关联表
 *
 * @author 永聚长青源码
 */
@TableName(value = "org_social_user_bind", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrgSocialUserBindDO extends OrgInfoBaseDO {

    /**
     * 编号
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String sysSocialUserBindId;
    /**
     * 关联的用户编号
     *
     * 关联 UserDO 的编号
     */
    private String userId;
    /**
     * 用户类型
     *
     * 枚举 {@link UserTypeEnum}
     */
    private UserTypeEnum userType;

    /**
     * 社交平台的用户编号
     *
     * 关联 {@link OrgSocialUserDO#getSysSocialUserId()} ()} ()}
     */
    private String sysSocialUserId;
    /**
     * 社交平台的类型
     *
     * 冗余 {@link OrgSocialUserDO#getSysSocialUserType()} ()}
     */
    private OrgSocialTypeEnum sysSocialType;

}
